package com.luojianping.openglrecord.livedata

import androidx.annotation.MainThread
import androidx.lifecycle.MutableLiveData


class PlayingLiveData(val isRecord: Boolean) : MutableLiveData<Boolean>(isRecord) {

    companion object {
        private lateinit var sInstance: PlayingLiveData

        @MainThread
        fun get(): PlayingLiveData {
            sInstance =
                if (Companion::sInstance.isInitialized) sInstance else PlayingLiveData(false)
            return sInstance
        }
    }

}